<template>
	<u-picker :show="show1" :columns="columns" :title="title" @confirm="confirm" @cancel="cancel"
		@close="close"></u-picker>
</template>

<script>
	export default {
		name: "myPicker",
		props: {
			title: {
				type: String,
				default: ''
			},
			show: {
				type: Boolean,
				default: false,
			},
			columns: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {
				show1: false
			};
		},
		watch: {
			show(newV) {
				this.show1 = newV
			}
		},
		methods: {
			confirm(e) {
				console.log('confirm', e)
				this.show1 = false
				this.$emit('confirm', e)
			},
			close(e) {
				console.log('confirm', e)
				this.show1 = false
				this.$emit('close')
			},
			cancel(e) {
				console.log('confirm', e)
				this.show1 = false
				this.$emit('cancel')
			},

		}
	}
</script>

<style lang="scss" scoped>

</style>